<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateDiscussesTable extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create('discusses', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('user_id')->comment('用户ID');
			$table->integer('class')->comment('评论对象: 0 文章; 1 评论');
			$table->integer('class_id')->comment('文章ID');
			$table->integer('pid')->comment('父级评论的ID');
			// $table->string('title')->comment('问题标题');
			$table->string('content')->comment('问题描述内容');
			$table->integer('admire')->comment('点赞数');
			$table->integer('status')->comment('评论状态: 1 正常显示; 0 删除');
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::drop('discusses');
	}
}
